package com.tmeone.erpone.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tmeone.erpone.entity.TOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author tmeone
 * @since 2021-04-19
 */
public interface TOrderMapper extends BaseMapper<TOrder> {
    //分页,状态,模糊综合查询
    IPage<TOrder> selectPageAll(IPage<TOrder> page,String orderState,String orderId,String dealTime);
    //根据日期或产能排序
    IPage<TOrder> selectSortPage(IPage<TOrder> page,String list);
    //修改订单
    void updOrder(TOrder order);
    /**
     * 分页查询所有订单
     * 可选条件查询，参数为null为非条件查询
     * 作者：wzs
     * @param page 当前页数
     * @param orderType   订单类型
     * @param orderStatus 订单状态
     * @param orderId     订单id
     * @param dealTime    交易时间
     * @return 订单
     */
    IPage<TOrder> selectAllByOrderTypeAndOrderStatusAndOrderIdLikeAndDealTime(Page<TOrder> page,@Param("orderType") String orderType, @Param("orderStatus") String orderStatus, @Param("orderId") String orderId, @Param("dealTime") String dealTime);
    //代发货订单详情分页查询
    IPage<TOrder> pageTOrderGo(IPage<TOrder> page);
    List<TOrder> selectOrderByOrderId(String orderId);
}

